package bb.lanxing.lib.devices.ble.ble.characteristic.light;

import bb.lanxing.lib.kt.ByteExtKt;
import java.util.LinkedHashSet;
import java.util.Set;
import kotlin.Metadata;

public final class LightTypeSet {
    private final boolean ConfurableSignalSupported;
    private final boolean HeadSupported;
    private final boolean LeftSignalSupported;
    private final boolean Other;
    private final boolean Reserved0;
    private final boolean Reserved1;
    private final boolean RightSignalSupported;
    private final boolean TailSupported;
    private final Set<LightType> supportSet;

    public LightTypeSet(int i) {
        LinkedHashSet linkedHashSet = new LinkedHashSet();
        this.supportSet = linkedHashSet;
        boolean bit2Boolean = ByteExtKt.bit2Boolean(i, 0);
        Boolean valueOf = bit2Boolean;
        Boolean bool = null;
        valueOf = !valueOf ? null : valueOf;
        if (valueOf != null) {
//            valueOf;
            linkedHashSet.add(LightType.Reserved0);
        }
        this.Reserved0 = bit2Boolean;
        boolean bit2Boolean2 = ByteExtKt.bit2Boolean(i, 1);
        Boolean valueOf2 = bit2Boolean2;
        valueOf2 = !valueOf2 ? null : valueOf2;
        if (valueOf2 != null) {
//            valueOf2;
            linkedHashSet.add(LightType.Headlight);
        }
        this.HeadSupported = bit2Boolean2;
        boolean bit2Boolean3 = ByteExtKt.bit2Boolean(i, 2);
        Boolean valueOf3 = bit2Boolean3;
        valueOf3 = !valueOf3 ? null : valueOf3;
        if (valueOf3 != null) {
//            valueOf3.booleanValue();
            linkedHashSet.add(LightType.TailLight);
        }
        this.TailSupported = bit2Boolean3;
        boolean bit2Boolean4 = ByteExtKt.bit2Boolean(i, 3);
        Boolean valueOf4 = bit2Boolean4;
        valueOf4 = !valueOf4 ? null : valueOf4;
        if (valueOf4 != null) {
//            valueOf4.booleanValue();
            linkedHashSet.add(LightType.ConfigurableSignalLight);
        }
        this.ConfurableSignalSupported = bit2Boolean4;
        boolean bit2Boolean5 = ByteExtKt.bit2Boolean(i, 4);
        Boolean valueOf5 = bit2Boolean5;
        valueOf5 = !valueOf5 ? null : valueOf5;
        if (valueOf5 != null) {
//            valueOf5.booleanValue();
            linkedHashSet.add(LightType.LeftSignalLight);
        }
        this.LeftSignalSupported = bit2Boolean5;
        boolean bit2Boolean6 = ByteExtKt.bit2Boolean(i, 5);
        Boolean valueOf6 = bit2Boolean6;
        valueOf6 = !valueOf6 ? null : valueOf6;
        if (valueOf6 != null) {
//            valueOf6.booleanValue();
            linkedHashSet.add(LightType.RightSignalLight);
        }
        this.RightSignalSupported = bit2Boolean6;
        boolean bit2Boolean7 = ByteExtKt.bit2Boolean(i, 6);
        Boolean valueOf7 = bit2Boolean7;
        valueOf7 = !valueOf7 ? null : valueOf7;
        if (valueOf7 != null) {
//            valueOf7.booleanValue();
            linkedHashSet.add(LightType.Reserved1);
        }
        this.Reserved1 = bit2Boolean7;
        boolean bit2Boolean8 = ByteExtKt.bit2Boolean(i, 7);
        Boolean valueOf8 = bit2Boolean8;
        bool = valueOf8 ? valueOf8 : bool;
        if (bool != null) {
//            bool.booleanValue();
            linkedHashSet.add(LightType.Other);
        }
        this.Other = bit2Boolean8;
    }

    public Set<LightType> getSupportSet() {
        return this.supportSet;
    }

    public boolean getReserved0() {
        return this.Reserved0;
    }

    public boolean getHeadSupported() {
        return this.HeadSupported;
    }

    public boolean getTailSupported() {
        return this.TailSupported;
    }

    public boolean getConfurableSignalSupported() {
        return this.ConfurableSignalSupported;
    }

    public boolean getLeftSignalSupported() {
        return this.LeftSignalSupported;
    }

    public boolean getRightSignalSupported() {
        return this.RightSignalSupported;
    }

    public boolean getReserved1() {
        return this.Reserved1;
    }

    public boolean getOther() {
        return this.Other;
    }

    public String toString() {
        return "LightTypeSet(supportSet=" + this.supportSet + ",HeadSupported=" + this.HeadSupported + ", Reserved0=" + this.Reserved0 + ", Tail Supported=" + this.TailSupported + ", Confurable Signal Supported=" + this.ConfurableSignalSupported + ", Left Signal Supported=" + this.LeftSignalSupported + ", Right Signal Supported=" + this.RightSignalSupported + ", Reserved1=" + this.Reserved1 + ", Other=" + this.Other + ')';
    }
}
